package com.mingqijia.gassafety.db.mapper;

import com.mingqijia.gassafety.db.entity.DtuAep;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import javax.validation.constraints.NotEmpty;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 设备和aep关联数据 Mapper 接口
 * </p>
 *
 * @author zhangfei
 * @since 2022-05-09
 */
@Mapper
@Repository
public interface DtuAepMapper extends BaseMapper<DtuAep> {

   List<Map<String,String>> selectDeviceIds(@Param("ids") List<String> ids);

    List<DtuAep> selectByStatus();

    void bindingEquipment(@Param("imeiList") List<String> imeiList, @Param("spId") String spId,  @Param("openTime") String openTime);


    void unbindEquipment(@Param("imei") String imei,@Param("spId") String spId);

    DtuAep selectCmpByImei(@Param("imei") String imei, @Param("spId")String spId);

    List<DtuAep> selectCmpListByImei(@Param("imei") String imei, @Param("spId")String spId);

}
